翻訳と辞書
Words near each other
・ Val-Louron
・ Val-Maravel
・ Val-Melanson, New Brunswick
・ Val-Morin, Quebec
・ Val-Paradis, Quebec
・ Val-Racine, Quebec
・ Val-Saint-Gilles, Quebec
・ Val-Saint-Lambert Abbey
・ Val-Suzon
・ Val-Test Distributors
・ Val-Tétreau District
・ VALA
・ Vala
・ Vala (Blake)
・ Vala (Middle-earth)
Vala (programming language)
・ Vala (Vedic)
・ Vala Chakradhar Rao
・ Vala clan
・ Vala Flosadóttir
・ Vala Mal Doran
・ Vala Rud
・ Vala State
・ Vala, or The Four Zoas
・ Valaam
・ Valaam Monastery
・ Valabetokana
・ Valabh Committee
・ Valac
・ Valachi hearings


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Vala (programming language) : ウィキペディア英語版
Vala (programming language)

Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system (that "can be seen as an alternative to C-derived languages such as C++ and Objective-C").
Vala is syntactically similar to C# and includes several features such as: anonymous functions, signals, properties, generics, assisted memory management, exception handling, type inference, and foreach statements.〔(【引用サイトリンク】title=Vala: high-level programming with less fat )〕 Its developers Jürg Billeter and Raffaele Sandrini aim to bring these features to the plain C runtime with little overhead and no special runtime support by targeting the GObject object system. Rather than compiling directly to machine code or assembly language, it compiles to a higher level intermediate language. It source-to-source compiles to C, which is then compiled with a C compiler for a given platform, such as GCC.
For memory management, the GObject system provides reference counting. In C, a programmer must manually manage adding and removing references, but in Vala, managing such reference counts is automated if a programmer uses the language's built-in reference types rather than plain pointers.
Using functionality from native code libraries requires writing vapi files, defining the library interfacing. Writing these interface definitions is well-documented for C libraries, especially when based on GObject. However, C++ libraries are not supported. Vapi files are provided for a large portion of the GNOME platform, including GTK+.
Vala was conceived by Jürg Billeter and was implemented by him and Raffaele Sandrini, finishing a self-hosting compiler in May 2006.
== Code example ==
A simple "Hello, World!" vala program (see also GTK+ hello world)

void main ()

A more complex version, showing some of Vala's object-oriented features:

class Sample : Object
}

An example using GTK+ to create a GUI "Hello, World!" program:

using Gtk;
int main (string[] args)

The last example needs an extra parameter to compile on GNOME3 platforms:

valac --pkg gtk+-3.0 hellogtk.vala

This is the converted C code:

/
* hellogtk.c generated by valac 0.28.0, the Vala compiler

* generated from hellogtk.vala, do not modify
*/
#include
#include
#include
#include
#include
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
gint _vala_main (gchar
*
* args, int args_length1);
static void _gtk_main_quit_gtk_widget_destroy (GtkWidget
* _sender, gpointer self);
static void _gtk_main_quit_gtk_widget_destroy (GtkWidget
* _sender, gpointer self)
gint _vala_main (gchar
*
* args, int args_length1)
int main (int argc, char
*
* argv)


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Vala (programming language)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.